<div class="login">
          <div class="wrap">
				<ul class="breadcrumb breadcrumb__t"><a class="home" href="<?php echo base_url(); ?>">Home</a>  / You are logged in as <?php echo $this -> mod_account -> get_logged_in_user_info() -> email; ?> </ul>
				<div class="section group">
					<?php $this -> load -> view(F_MASTER . "dashboard_account"); ?>
				   
				    <div class="cont span_2_of_about">
				    	
				    		<!--<div class="alert alert-error"><?php echo validation_errors(); ?></div>-->
					
				
	           		<h3>Compose Mail</h3>
	           		<form class="form-horizontal" method="post" action="<?php echo base_url(); ?>account/compose-mail">	
		<div class="row">
                <div class="col-lg-12">
                	<?php
					//$this->load->view('help/notifications');
                    ?>
                    <div class="panel panel-primary">
                        <div class="panel-heading">
                          Mail Information
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body form-horizontal">
							
							
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-3 control-label" for="send_to">To <span style="color: red;">*</span> :</label>
								<div class="col-md-7">
									<input id="send_to" name="send_to" placeholder="" autocomplete="off" class="form-control input-md" type="text" data-provide="typeahead" data-items="10">
									<span class="help-block"><?php echo form_error('send_to'); ?></span>
								</div>
							</div>
							
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-3 control-label" for="subject">Subject <span style="color: red;">*</span> :</label>
								<div class="col-md-7">
									<input id="subject" name="subject" placeholder="" class="form-control input-md" type="text" >
									<span class="help-block"><?php echo form_error('subject'); ?></span>
								</div>
							</div>
							
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-3 control-label" for="message">Message :</label>
								<div class="col-md-8">
									<textarea class="form-control" rows="12" name="message"></textarea>
									<span class="help-block"><?php echo form_error('message'); ?></span>
								</div>
							</div>
							
							
											
                         </div>
                    </div>
                </div>
           </div>
           
           
           
           <div class="row"><!-- Button (Double) -->
							
                <div class="col-lg-12">
                    	<div class="form-group">
								<label class="col-md-4 control-label" for="submit"></label>
								<div class="col-md-8">
									<button id="submit" name="submit" class="btn btn-success" type="submit">
										<span class="glyphicon glyphicon-envelope"></span>
										Send
									</button>
									<button id="clear" name="clear" class="btn btn-warning" type="reset" >
										<span class="glyphicon glyphicon-remove"></span>
										<?php echo $this -> lang -> line('button_clear'); ?>
									</button>
								</div>
							</div>
                </div>
                <!-- /.col-lg-12 -->
            </div>
</form>                   	
			    
				
				<div class="clear"></div>
			
					</div>
           </div>
		   <div class="clear"></div>	
		  </div>
	</div>	
  
<?php
$dServer = array();
foreach($mails->result() as $row){
	$dServer[]=$row->email;
}
?>

<script>
var emails = <?php echo json_encode($dServer); ?>;
$('#send_to').typeahead({source: emails})
</script>
